package com.victor.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.victor.entity.txt.BgIntroduction;
import com.victor.entity.txt.PrizesSetList;
import com.victor.entity.txt.PrizesSetMsg;
import com.victor.entity.txt.Selection;

@Mapper
public interface TxtDao {

	// 获取 背景介绍和远景展望
	@Select({ "SELECT * FROM t_bgintroduction WHERE id=1 " })
	BgIntroduction getBgIntroduction();

	// 修改 背景介绍和远景展望
	int updBgIntroduction(BgIntroduction bgIntroduction);

	// 获取奖项设置页面信息
	@Select({ "SELECT * FROM t_prizessetmsg WHERE id=1 " })
	PrizesSetMsg getPrizesSetMsg();

	// 获取奖项设置列表
	@Select({ "SELECT * FROM t_prizessetlist " })
	List<PrizesSetList> getPrizesSetList();

	// 修改奖项设置信息
	int updPrizesSetMsg(PrizesSetMsg prizesSetMsg);

	// 修改奖项列表
	int updPrizesSetList(PrizesSetList prizesSetList);

	// 添加奖项设置
	@Insert({ "insert into t_prizessetlist (prizename,prizecontent) values (#{prizename},#{prizecontent})" })
	int addPrizesSet(PrizesSetList prizesSet);

	// 批删奖项设置
	int batchDelPrizesSet(@Param("ids") int[] ids);

	// 获取评选方法及步骤
	@Select({ "select * from t_selection order by step_no asc" })
	List<Selection> getSelectionList();

	// 修改评选方法或步骤
	int updSelection(Selection selection);

}
